How to use arithmetic operators in a query.In Query Design view, use field names and common mathematic operators (+,-,*,/) together to create calculated fields. 1) If the Database window is not active, activate the Database window. 2) Choose the 'Queries' tab in the Database window. < 3) Select the desired query in the list box. (The selected query is highlighted.) 4) Choose the 'Design' button. (The query appears in Design View.) 5) Click in the next blank cell in the 'Field' row. (The cursor blinks.) 6) Enter the expression and calculation using the following syntax: Expression:[fieldname] operator [fieldname] EXAMPLE 1: Markup:[UnitPrice]*1.25 (where < Markup > is the expression name, [UnitPrice] is a field name in the underlying table or query, the '*' is the math operator for multiplication, and 1.25 is a number). EXAMPLE 2: Total: ([UnitPrice] * [Quantity])*[Sales Tax Amount] (where < Total > is the expression name, [UnitPrice] is a field name in the underlying table or query, '*' is the math operator for multiplication, [Quantity] is a field name in the underlying table or query, and [Sales Tax Amount] is a field name in the underlying table or query). 7) Select the 'File' menu and select 'Save' to save changes to the query. 8) Select the 'Query' menu and select 'Run' to view the results of the query. Knowledge-Pak Desktop Suite (TM) Edition 5 Copyright (c) 1994-1997 by ServiceWare Inc. Subject to the terms set forth in the end-user license agreement. All rights reserved. Subject to the terms set forth in the end-user license agreement. All rights reserved. |